<nav class="navbar main-nav border-less fixed-top navbar-expand-lg p-0">
    <div class="container-fluid p-0">
        <a class="navbar-brand p-3" href="/">
            <img class="logo" src="{$site.logo}" alt="logo">
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="fa fa-bars"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav mx-auto">
                {hkcms:channel type="top" ismenu="1" ismenu="1"}
                {if $item.has_child}
                <li class="nav-item dropdown {$item.currentstyle}">
                    <a class="nav-link" href="{$item.url}" data-toggle="dropdown" target="{$item.target}">{$item.title} <i class="fa fa-angle-down"></i>
                        <span>/</span>
                    </a>
                    <ul class="dropdown-menu">
                        {hkcms:channel name="$item['id']" id="son" type="son" ismenu="1"}
                        <li><a class="dropdown-item" href="{$son.url}">{$son.title}</a></li>
                        {/hkcms:channel}
                    </ul>
                </li>
                {else /}
                <li class="nav-item {$item.currentstyle}">
                    <a class="nav-link" href="{$item.url}" target="{$item.target}">{$item.title}
                        <span>/</span>
                    </a>
                </li>
                {/if}
                {/hkcms:channel}
                <li class="nav-item dropdown">
                    {hkcms:language currentstyle="active"}
                    {if $currentstyle}
                    <a class="nav-link" href="#!" data-toggle="dropdown"> <i class="fa fa-language"></i></a>
                    {/if}
                    {/hkcms:language}
                    <ul class="dropdown-menu">
                        {hkcms:language currentstyle="active"}
                        <li><a class="dropdown-item" href="{$item.url}">{$item.value}</a></li>
                        {/hkcms:language}
                    </ul>
                </li>
                <li class="nav-item">
                    <div class="navbar-pc">
                        <a class="nav-link" href="#!" data-toggle="dropdown"> <i class="fa fa-search"></i></a>
                        <ul class="dropdown-menu p-2 m-0 shadow-sm" style="right: 0;left:initial;">
                            <div class="search-block" style="min-width: 300px;width: 100%;">
                                {// 输入关键词跳搜索页，地址为：index_url('/search/index')，文档地址： https://www.kancloud.cn/hkcms/hkcms_tp6/2511010 }
                                <form class="search-form" action="{:index_url('/search/index')}" method="get">
                                    <label for="search-field" class="w-100 mb-0">
                                        <input type="text" class="form-control mb-0 w-100" name="keyword" id="search-field" placeholder="{:__('Enter a keyword and press Enter to search')}">
                                    </label>
                                </form>
                            </div>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</nav>